import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

// 种群信息
export const useBaseParamStore = defineStore(
  'baseParam',
  () => {
    const baseParam = ref({
      // 猪群id
      flockId: '',
      // eas用户id
      easPersonId: '',
      businessType: '',
      // 苍穹token
      cqToken: '',
      // 组织id
      orgId: '',
      // 养户id
      rearerId: '',
      // 选择时间
      pickTime: []
    })
    // 获取响应式对象
    const getBaseParam = computed(() => baseParam)

    return { baseParam, getBaseParam }
  },
  { persist: true }
)
